-
Notifications
You must be signed in to change notification settings - Fork 75
Conversation
This means we can make the event _stateful_ so subscribing always gives us the last state.
e236267
to
8157087
Compare
network/network.go
Outdated
@@ -53,6 +53,24 @@ const ( | |||
CannotConnect | |||
) | |||
|
|||
// Routability indicates how reachable a node is. | |||
type Routability int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
worth making this a byte
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@willscott What's the advantage of making this a byte ? Saving space ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@willscott What's the advantage of making this a byte ? Saving space ?
Right. Could potentially allow for better packing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd support it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No real reason not to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, well, except for consistency with Connectedness
, Direction
, and most other enums.
@Stebalien I like "reachability" more than "routability". Makes the concept more readable & understandable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to "reachability". It's probably the -ability that I was shooting for, but my mind was fried when this code was written.
network/network.go
Outdated
@@ -53,6 +53,24 @@ const ( | |||
CannotConnect | |||
) | |||
|
|||
// Routability indicates how reachable a node is. | |||
type Routability int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd support it.
@Stebalien anything preventing this from being merged? |
@@ -53,6 +53,25 @@ const ( | |||
CannotConnect | |||
) | |||
|
|||
// Reachability indicates how reachable a node is. | |||
type Reachability int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for clarification is the reason we're put the enum in the network package instead of the event package because we're hoping reachability will be more general than just the EvtLocalReachabilityChanged
event?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Basically, it's not specific to the event itself.
Notes/Questions: